/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bs.ventas.modelo;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Claudio
 */
@Embeddable
public class ItemListaPrecioPK implements Serializable {
    
    @Basic(optional = false)
    @Column(name = "CODLIS", nullable = false, length = 10)
    private String codlis;    
    @Basic(optional = false)
    @Column(name = "ARTCOD", nullable = false, length = 30)
    private String artcod;
    @Basic(optional = false)
    @Column(name = "FECLIS", nullable = false)
    @Temporal(TemporalType.DATE)
    private Date feclis;

    public ItemListaPrecioPK(){

    }

    public ItemListaPrecioPK(String sttpreCodlis, String sttpreArtcod, Date sttpreFeclis) {
        this.codlis = sttpreCodlis;        
        this.artcod = sttpreArtcod;
        this.feclis = sttpreFeclis;
    }

    public String getSttpreCodlis() {
        return codlis;
    }

    public void setSttpreCodlis(String sttpreCodlis) {
        this.codlis = sttpreCodlis;
    }

  

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (codlis != null ? codlis.hashCode() : 0);
        hash += (artcod != null ? artcod.hashCode() : 0);
        hash += (feclis != null ? feclis.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof ItemListaPrecioPK)) {
            return false;
        }
        ItemListaPrecioPK other = (ItemListaPrecioPK) object;
        if ((this.codlis == null && other.codlis != null) || (this.codlis != null && !this.codlis.equals(other.codlis))) {
            return false;
        }
        if ((this.artcod == null && other.artcod != null) || (this.artcod != null && !this.artcod.equals(other.artcod))) {
            return false;
        }
        if ((this.feclis == null && other.feclis != null) || (this.feclis != null && !this.feclis.equals(other.feclis))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "tv.inventario.modelo.PrecioProductoPK[sttpreCodlis=" + codlis + ", sttpreArtcod=" + artcod + ", sttpreFeclis=" + feclis + "]";
    }

}
